package com.youshang520i.demo.controller;

import com.youshang520i.demo.service.StockService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 扣减库存测试
 *
 * @author youshang
 * @date 2021/03/11 14:14
 **/
@RestController
@RequestMapping("/stock")
public class StockController {
    @Autowired
    private StockService stockService;

    @RequestMapping("test")
    public void stock_test() {
        System.out.println("controller1。。。。。。     " + Thread.currentThread().getName());
        stockService.deductions();
    }

    @RequestMapping("test2")
    public void stock_test2() {
        System.out.println("controller2。。。。。。     " + Thread.currentThread().getName());
        stockService.deductions2();
    }

    @RequestMapping("test3")
    public void stock_test3() {
        System.out.println("controller3。。。。。。     " + Thread.currentThread().getName());
        stockService.deductions3();
    }

    @RequestMapping("test4")
    public void stock_test4() {
        System.out.println("controller4。。。。。。     " + Thread.currentThread().getName());
        stockService.deductions4();
    }
}
